<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>立方体动画</title>
    <link rel="stylesheet" href="./index4.css">
    <style>
        @keyframes rotate {
            from {
                transform: rotateX(10deg) rotateY(10deg);
            }
            to {
                transform: rotateX(270deg) rotateY(270deg);
            }
        }
        .farme {
            width: 200px;
            height: 200px;
            transform-style: preserve-3d;
            box-sizing: border-box;
            margin: 200px auto;
            position: relative;
            animation: rotate 8s 0.1s linear alternate-reverse infinite forwards;
        }
        .box {
           box-sizing: border-box;
            border: 1px solid black;
            width: 200px;
            height: 200px;
            position: absolute;
            top: 0;
            left: 0;
        }
        .box1 {
            background-color: aqua;
            transform: translateY(-100px) rotateX(90deg); 
        }
        .box2 {
            background-color: aqua;
            transform: translateY(100px) rotateX(90deg);
        }
        .box3 {
            background-color: aqua;
            transform: translateX(-100px) rotateY(90deg);
        }
        .box4 {
            background-color: aqua;
            transform: translateX(100px) rotateY(90deg);
        }
        .box5 {
            background-color: aqua;
            transform: translateZ(100px);
        }
        .box6 {
            background-color: aqua;
            transform: translateZ(-100px);
        }
    </style>
</head>
<body>
    <div class="top-nav">
        <ul>
            <li><a href="./1css样式二.html">css样式二</a></li>
            <li><a href="./浮动练习.html">浮动与定位</a></li>
            <li><a target="_blank" href="./字体图标练习.html">字体图标</a></li>
            <li><a href="./键盘焦点与鼠标悬停.html">导航菜单</a></li>
        </ul>
        </div>
    <div class="farme">
        <div class=" box box1">上</div>
        <div class=" box box2">下</div>
        <div class=" box box3">左</div>
        <div class=" box box4">右</div>
        <div class=" box box5">前</div>
        <div class=" box box6">后</div>
    </div>
    <div class="next"><a href="./2D练习.html">点我去2D练习</a></div>
</body>
</html>